#include<stdio.h>

#define SPACE ' '
#define STAR '#'
#define ENDL '\n'
void printNChar(char c,int n)
{
    while(n--)
        putchar(c);
}
int main()
{
    int n,i;
    scanf("%d",&n);
    for(i=0;i<n;i++)//print top triangle
    {
        printNChar(SPACE,n-i);
        printNChar(STAR,2*i+1);
        putchar(ENDL);
    }
    for(i=n-2;i>=0;i--)//print bottom triangle
    {
        printNChar(SPACE,n-i);
        printNChar(STAR,2*i+1);
        putchar(ENDL);
    }
    return 0;
}
